package com.qf.service.serviceimpl;

import com.qf.dao.CategoryDao;
import com.qf.dao.daoimpl.CategoryDaoImpl;
import com.qf.pojo.Category;
import com.qf.service.CategoryService;

import java.sql.SQLException;
import java.util.List;

/**
 * @author Mr.Liu
 * @date 2021/11/24 21:07
 */

public class CategoryServiceImpl implements CategoryService {

    @Override
    public List<Category> findAllCategory() {
        try {
            CategoryDao ad = new CategoryDaoImpl();
            List<Category> list = ad.findAllCategory();
            if(list!=null){
                return list;
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return null;
    }
}
